mainFrame

abstract fun mainFrame(): Optional<Frame>

Returns an Optional that contains the main Frame of the currently loaded web page if it exists, otherwise an empty Optional.

Make sure that the web page is loaded completely before accessing its main frame.

Throws

when the browser is already closed